<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>Document</title>
  </head>
  <body>
    <input type="text" id="elInput" value="jack" />
    <script>
      const elInput = document.getElementById("elInput");
      // 特性变化
      setTimeout(() => {
        elInput.value = "lili";
      }, 3000);

      // 属性同步变化
      setTimeout(() => {
        console.log(elInput.getAttribute("value"));
      }, 5000);
    </script>
  </body>
</html>
